# Contributor: Patrycja Rosa <alpine@ptrcnull.me>
# Maintainer: Patrycja Rosa <alpine@ptrcnull.me>
pkgname=py3-shodan
pkgver=1.27.0
pkgrel=0
pkgdesc="The official Python library for Shodan"
url="https://developer.shodan.io/"
arch="noarch"
license="MIT"
depends="
	python3
	py3-click
	py3-click-plugins
	py3-colorama
	py3-requests
	py3-xlsxwriter
	"
makedepends="py3-setuptools py3-sphinx"
checkdepends="py3-pytest"
subpackages="$pkgname-doc"
source="https://github.com/achillean/shodan-python/archive/$pkgver/py3-shodan-$pkgver.tar.gz"
builddir="$srcdir/shodan-python-$pkgver"
options="!check" # tests require a working api key

build() {
	python3 setup.py build
	make -C docs man
}

package() {
	python3 setup.py install --prefix=/usr --root="$pkgdir"

	install -Dm644 docs/_build/man/shodan-python.1 -t "$pkgdir"/usr/share/man/man1
}

sha512sums="
b9813f945b69db7c414665a8fb1d41c046ce8a8b8bbfd40bd7888840a88b80b248755f1fb8f54c3647d599e673e7a637be76c8f704c64299d72e8c406a33c346  py3-shodan-1.27.0.tar.gz
"
